Skip to content

Add the digest-environment dependency configuration#2036

Merged
juergbi merged 10 commits intomasterfrom
abderrahim/digest-environment
Sep 8, 2025
Merged

Add the digest-environment dependency configuration#2036
juergbi merged 10 commits intomasterfrom
abderrahim/digest-environment

Conversation

@abderrahim
Copy link
Contributor

This allows setting an environment variable inside the sandbox to the CAS digest of one or more dependencies.

This us useful when communicating with the nested remote execution endpoint, but could also be used independently.

This PR replaced #1991.

@juergbi juergbi force-pushed the abderrahim/digest-environment branch 2 times, most recently from 3ed3ac8 to 973ac1c Compare July 25, 2025 15:48
@juergbi juergbi force-pushed the abderrahim/digest-environment branch from 973ac1c to bd8786f Compare August 15, 2025 14:13
Copy link
Contributor Author

@abderrahim abderrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments but otherwise looks good.

(I can't approve on Github because I created the pull request)

@juergbi juergbi force-pushed the abderrahim/digest-environment branch 3 times, most recently from 8d54e59 to 8955e5e Compare August 22, 2025 11:05
@juergbi juergbi force-pushed the abderrahim/digest-environment branch 2 times, most recently from 587e47e to a071816 Compare August 30, 2025 14:37
juergbi and others added 6 commits September 5, 2025 09:38
Elements can configure additional environment variables in
`configure_sandbox()`, which will be used by `BuildElement` to support
`digest-environment`. Use the complete environment for logging and
`bst shell`.
This allows an element to use a secondary sandbox for manipulating
artifacts that don't affect the build.
With the introduction of subsandboxes, a single overlap collector is no
longer sufficient.
The subsandboxes can be used to extract a CAS digest that could be used for
nested remote execution, and thus need to be available in the remote execution
CAS.
@juergbi juergbi force-pushed the abderrahim/digest-environment branch from a071816 to 97edc85 Compare September 5, 2025 08:44
Copy link
Contributor Author

@abderrahim abderrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (with a couple nits)

juergbi and others added 3 commits September 8, 2025 08:13
This is stored only when also storing the build tree. It is used to
configure the sandbox for `bst shell --use-buildtree`.

This is required for elements that create subsandboxes as part of
`configure_sandbox()`.
This allows setting an environment variable inside the sandbox to the CAS
digest of one or more dependencies.

Co-authored by: Adrien Plazas <adrien.plazas@codethink.co.uk>
@juergbi juergbi force-pushed the abderrahim/digest-environment branch from 97edc85 to a2f076f Compare September 8, 2025 13:18
@juergbi juergbi merged commit fd38499 into master Sep 8, 2025
30 of 36 checks passed
@juergbi juergbi deleted the abderrahim/digest-environment branch September 8, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants